package com.hongmeng.teamwork.convert;

import com.hongmeng.teamwork.entity.dto.ProjectGroupRelDto;
import com.hongmeng.teamwork.entity.po.TeamworkProjectGroupRel;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface TeamworkProjectGroupRelConvert {

    TeamworkProjectGroupRelConvert INSTANCE = Mappers.getMapper(TeamworkProjectGroupRelConvert.class);

    @Mappings({
            @Mapping(target = "groupName", source = "name"),
            @Mapping(target = "createdBy", source = "openId")
    })
    TeamworkProjectGroupRel convertDtoToEntity(ProjectGroupRelDto projectGroupRelDto);
}
